<template>
	<div>
		<ul>
			<li v-for="item in list" :key="item.id" @click="jump(item.id)">
				<div class="item_left">
					<p class="p1">{{ item.title }}</p>
					<p class="p2">{{ item.hint }}</p>
				</div>
				<div class="item_right">
					<img :src="item.images[0]">
				</div>
				<div class="clear"></div>
			</li>
		</ul>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				list:[],
				num:{},
			}
		},
		created(){
			this.getlist()
			this.num = localStorage.getItem("userinfo")
			// console.log(this.num)
		},
		methods:{
			getlist:function(){
				this.$http.get('http://chonghekj.com/daily/index.php/Home/daily/latest',{
					
				})
				.then((res)=>{
					// console.log(res.data.stories)
					this.list = res.data.stories
					// console.log(res.data.top_stories)
				})
			},
			jump:function(id){
				// console.log(id)
				this.$router.push({
					path:'/xq',
					query:{
						id,
						// uid,
						// access_token
					}
				})
			}
		}
	}
</script>

<style lang="less">
	*{
		margin: 0 ;
		padding: 0;
	}
	ul li{
		list-style: none;
		margin: 10px 10px;
	}
	.item_left{
		width: 70%;
		float: left;
		.p1{
			font-size: 18px;
			font-weight: 600;
			color: #323233;
		}
		.p2{
			font-size: 16px;
			color: #C8C9CC;
		}
	}
	.item_right{
		width: 25%;
		float: right;
		img{
			width: 95%;
		}
	}
	.clear{
		clear: both;
	}
</style>
